home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / ModEditSurfacesMenu.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  24.4 KB  |  823 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. // Copyright (C) 1997-1998 Alias|Wavefront,
  18. // a division of Silicon Graphics Limited.
  19. //
  20. // The information in this file is provided for the exclusive use of the
  21. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  22. // and incorporate this code into other products for purposes authorized
  23. // by the Alias|Wavefront license agreement, without fee.
  24. //
  25. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  26. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  27. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  28. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  29. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  30. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  31. // PERFORMANCE OF THIS SOFTWARE.
  32. //
  33. //
  34. // Alias|Wavefront Script File
  35. // MODIFY THIS AT YOUR OWN RISK
  36. //
  37. // Creation Date:  13 April 1997
  38. // Author:         gf
  39. //
  40. //
  41. //  Procedure Name:
  42. //      ModEditSurfacesMenu
  43. //
  44. //  Description:
  45. //        Create the MODELLING->EditSurfaces menu
  46. //
  47. //  Input Arguments:
  48. //      parent to parent the menu to.
  49. //
  50. //  Return Value:
  51. //      None.
  52. //
  53.  
  54. proc modEditSurfacesMenuLabel( int $isAdvModel )
  55. {
  56.     if( `optionVar -q modelWithToolDuplicateSurface` ) {
  57.         menuItem -e
  58.           -l "Duplicate NURBS Patches Tool"
  59.           -annotation ("Duplicate NURBS Patches Tool: Select " +
  60.                        "NURBS Patch(es)")
  61.           duplSrfItem;
  62.         menuItem -e
  63.           -annotation ("Duplicate NURBS Patches Tool Option Box")
  64.           -l ("Duplicate NURBS Patch(es) Tool Option Box")
  65.           duplSrfDialog;
  66.     }
  67.     else {
  68.         menuItem -e
  69.           -l "Duplicate NURBS Patches"
  70.           -annotation ("Duplicate NURBS Patches: Select NURBS Patch(es)")
  71.           duplSrfItem;
  72.         menuItem -e
  73.           -annotation ("Duplicate NURBS Patches Option Box")
  74.           -l ("Duplicate NURBS Patches Option Box")
  75.           duplSrfDialog;
  76.     }
  77.  
  78.     if( `optionVar -q modelWithToolAttachSurface` ) {
  79.         menuItem -e
  80.           -l "Attach Surfaces Tool"
  81.           -annotation ("Attach Surfaces Tool: Select two surfaces")
  82.           attachSrfItem;
  83.         menuItem -e
  84.           -annotation ("Attach Surfaces Tool Option Box")
  85.           -l ("Attach Surfaces Tool Option Box")
  86.           attachSrfDialog;
  87.     }
  88.     else {
  89.         menuItem -e
  90.           -l "Attach Surfaces"
  91.           -annotation ("Attach Surfaces: Select two surfaces")
  92.           attachSrfItem;
  93.         menuItem -e
  94.           -annotation ("Attach Surfaces Option Box")
  95.           -l ("Attach Surfaces Option Box")
  96.           attachSrfDialog;
  97.     }
  98.  
  99.     if( `optionVar -q modelWithToolDetachSurface` ) {
  100.         menuItem -e
  101.           -l "Detach Surfaces Tool"
  102.           -annotation ("Detach Surfaces Tool: Select isoparm(s)")
  103.           detachItem;
  104.         menuItem -e
  105.           -annotation ("Detach Surfaces Tool Option Box")
  106.           -l ("Detach Surfaces Tool Option Box")
  107.           detachDialog;
  108.     }
  109.     else {
  110.         menuItem -e
  111.           -l "Detach Surfaces"
  112.           -annotation ("Detach Surfaces: Select isoparm(s)")
  113.           detachItem;
  114.         menuItem -e
  115.           -annotation ("Detach Surfaces Option Box")
  116.           -l ("Detach Surfaces Option Box")
  117.           detachDialog;
  118.     }
  119.  
  120.     if( `optionVar -q modelWithToolAlignSurface` ) {
  121.         menuItem -e
  122.           -l "Align Surfaces Tool"
  123.           -annotation ("Align Surfaces Tool: Select two surfaces")
  124.           alignItem;
  125.         menuItem -e
  126.           -annotation ("Align Surfaces Tool Option Box")
  127.           -l ("Align Surfaces Tool Option Box")
  128.           alignDialogItem;
  129.     }
  130.     else {
  131.         menuItem -e
  132.           -l "Align Surfaces"
  133.           -annotation ("Align Surfaces: Select two surfaces")
  134.           alignItem;
  135.         menuItem -e
  136.           -annotation ("Align Surfaces Option Box")
  137.           -l ("Align Surfaces Option Box")
  138.           alignDialogItem;
  139.     }
  140.  
  141.     if( `optionVar -q modelWithToolInsertSurface` ) {
  142.         menuItem -e
  143.           -l "Insert Isoparms Tool"
  144.           -annotation ("Insert Isoparms Tool: Select isoparm(s)")
  145.           insertItem;
  146.         menuItem -e
  147.           -annotation ("Insert Isoparms Tool Option Box")
  148.           -l ("Insert Isoparms Tool Option Box")
  149.           insertDialog;
  150.     }
  151.     else {
  152.         menuItem -e
  153.           -l "Insert Isoparms"
  154.           -annotation ("Insert Isoparms: Select isoparm(s)")
  155.           insertItem;
  156.         menuItem -e
  157.           -annotation ("Insert Isoparms Option Box")
  158.           -l ("Insert Isoparms Option Box")
  159.           insertDialog;
  160.     }
  161.  
  162.     if( $isAdvModel ) {
  163.         if( `optionVar -q modelWithToolOffsetSurface` ) {
  164.             menuItem -e
  165.                 -l "Offset Surfaces Tool"
  166.                 -annotation "Offset Surface Tool: Select NURBS surface(s)"
  167.                 surfOffsetItem;
  168.             menuItem -e
  169.                 -annotation "Offset Surface Tool Option Box"
  170.                 -l "Offset Surface Tool Option Box"
  171.                 offsetSurfaceDialogItem;
  172.         }
  173.         else {
  174.             menuItem -e
  175.                 -l "Offset Surfaces"
  176.                 -annotation "Offset Surface: Select NURBS surface(s)"
  177.                 surfOffsetItem;
  178.             menuItem -e
  179.                 -annotation "Offset Surface Option Box"
  180.                 -l "Offset Surface Option Box"
  181.                 offsetSurfaceDialogItem;
  182.         }
  183.  
  184.         if( `optionVar -q modelWithToolExtendSurface` ) {
  185.             menuItem -e
  186.                 -l "Extend Surfaces Tool"
  187.                 -annotation "Extend Surfaces Tool: Select NURBS surface(s)"
  188.                 extendSrfItem;
  189.             menuItem -e
  190.                 -annotation "Extend Surfaces Tool Option Box"
  191.                 -l "Extend Surfaces Tool Option Box"
  192.                 extendSurfaceDialogItem;
  193.         }
  194.         else {
  195.             menuItem -e
  196.                 -l "Extend Surfaces"
  197.                 -annotation "Extend Surfaces: Select surface(s)"
  198.                 extendSrfItem;
  199.             menuItem -e
  200.                 -annotation "Extend Surfaces Option Box"
  201.                 -l "Extend Surfaces Option Box"
  202.                 extendSurfaceDialogItem;
  203.         }
  204.     }
  205.  
  206.     if( `optionVar -q modelWithToolGlobalStitch` ) {
  207.         menuItem -e
  208.             -l "Global Stitch Tool"
  209.             -annotation "Global Stitch Tool: Select NURBS surfaces"
  210.             globalStitchItem;
  211.         menuItem -e
  212.             -annotation "Global Stitch Tool Option Box"
  213.             -l "Global Stitch Tool Option Box"
  214.             globalStitchDialogItem;
  215.     }
  216.     else {
  217.         menuItem -e
  218.             -l "Global Stitch"
  219.             -annotation "Global Stitch: Select NURBS surfaces"
  220.             globalStitchItem;
  221.         menuItem -e
  222.             -annotation "Global Stitch Option Box"
  223.             -l "Global Stitch Option Box"
  224.             globalStitchDialogItem;
  225.     }
  226.  
  227.     if( `optionVar -q modelWithToolCircFillet` ) {
  228.         menuItem -e
  229.             -l "Circular Fillet Tool"
  230.             -annotation "Circular Fillet Tool: Select two NURBS surfaces"
  231.             circularFilletItem;
  232.         menuItem -e
  233.             -annotation "Circular Fillet Tool Option Box"
  234.             -l "Circular Fillet Tool Option Box"
  235.             circularFilletDialogItem;
  236.     }
  237.     else {
  238.         menuItem -e
  239.             -l "Circular Fillet"
  240.             -annotation "Circular Fillet: Select two surfaces"
  241.             circularFilletItem;
  242.         menuItem -e
  243.             -annotation "Circular Fillet Option Box"
  244.             -l "Circular Fillet Option Box"
  245.             circularFilletDialogItem;
  246.     }
  247.  
  248.     if( `optionVar -q modelWithToolFreeFillet` ) {
  249.         menuItem -e
  250.             -l "Freeform Fillet Tool"
  251.             -annotation ("Freeform Fillet Tool: Select two curves " +
  252.                          "on surface, isoparms or trim edges")
  253.             freeFormFilletItem ;
  254.         menuItem -e
  255.             -annotation "Freeform Fillet Tool Option Box"
  256.             -l "Freeform Fillet Tool Option Box"
  257.             freeFormFilletDialogItem;
  258.     }
  259.     else {
  260.         menuItem -e
  261.             -l "Freeform Fillet"
  262.             -annotation ("Freeform Fillet: Select two curves " +
  263.                          "on surface, isoparms or trim edges")
  264.             freeFormFilletItem ;
  265.         menuItem -e
  266.             -annotation "Freeform Fillet Option Box"
  267.             -l "Freeform Fillet Option Box"
  268.             freeFormFilletDialogItem;
  269.     }
  270.  
  271.     if( `optionVar -q modelWithToolProject` ) {
  272.         menuItem -e
  273.             -l "Project Curve On Surface Tool"
  274.             -annotation ( "Project Curve On Surface Tool: Select curve(s), isoparm(s)" +
  275.                           " or trim edge(s) and a target surface" )
  276.             projectCurveItem;
  277.         menuItem -e
  278.             -annotation "Project Curve On Surface Tool Option Box"
  279.             -l "Project Curve On Surface Tool Option Box"
  280.             projectCurveDialogItem;
  281.     }
  282.     else {
  283.         menuItem -e
  284.             -l "Project Curve On Surface"
  285.             -annotation ( "Project Curve On Surface: Select curve(s), isoparm(s)" +
  286.                           " or trim edge(s) and a target surface" )
  287.             projectCurveItem;
  288.         menuItem -e
  289.             -annotation "Project Curve On Surface Option Box"
  290.             -l "Project Curve On Surface Option Box"
  291.             projectCurveDialogItem;
  292.     }
  293.  
  294.     if( `optionVar -q modelWithToolIntersect` ) {
  295.         menuItem -e
  296.             -l "Intersect Surfaces Tool"
  297.             -annotation ( "Intersect Surfaces Tool: Select two or more " +
  298.                           "surfaces " +
  299.                           "- the last surface intersects all the other ones" )
  300.             intersectItem;
  301.         menuItem -e
  302.             -annotation "Intersect Surfaces Tool Option Box"
  303.             -l "Intersect Surfaces Tool Option Box"
  304.             intersectDialogItem;
  305.     }
  306.     else {
  307.         menuItem -e
  308.             -l "Intersect Surfaces"
  309.             -annotation ( "Intersect Surfaces: Select two or more " +
  310.                           "surfaces " +
  311.                           "- the last surface intersects all the other ones" )
  312.             intersectItem;
  313.         menuItem -e
  314.             -annotation "Intersect Surfaces Option Box"
  315.             -l "Intersect Surfaces Option Box"
  316.             intersectDialogItem;
  317.     }
  318.  
  319.     if( `optionVar -q modelWithToolCloseSurface` ) {
  320.         menuItem -e
  321.             -l "Open/Close Surfaces Tool"
  322.             -annotation ( "Open/Close Surfaces Tool: Select surface(s) " +
  323.                           "or isoparm(s) to give direction" )
  324.             closeItem;
  325.         menuItem -e
  326.             -annotation "Open/Close Surfaces Tool Option Box"
  327.             -l "Open/Close Surfaces Tool Option Box"
  328.             closeDialogItem;
  329.     }
  330.     else {
  331.         menuItem -e
  332.             -l "Open/Close Surfaces"
  333.             -annotation ( "Open/Close Surfaces: Select surface(s) " +
  334.                           "or isoparm(s) to give direction" )
  335.             closeItem;
  336.         menuItem -e
  337.             -annotation "Open/Close Surfaces Option Box"
  338.             -l "Open/Close Surfaces Option Box"
  339.             closeDialogItem;
  340.     }
  341.  
  342.     if( `optionVar -q modelWithToolReverseSurface` ) {
  343.         menuItem -e
  344.             -l "Reverse Surface Direction Tool"
  345.             -annotation ( "Reverse Surfaces Tool: Select surface(s) " +
  346.                           "or isoparm(s) to give direction" )
  347.             reverseItem;
  348.         menuItem -e
  349.             -annotation "Reverse Surfaces Tool Option Box"
  350.             -l "Reverse Surfaces Tool Option Box"
  351.             reverseDialogItem;
  352.     }
  353.     else {
  354.         menuItem -e
  355.             -l "Reverse Surface Direction"
  356.             -annotation ( "Reverse Surfaces: Select surface(s) " +
  357.                           "or isoparm(s) to give direction" )
  358.             reverseItem;
  359.         menuItem -e
  360.             -annotation "Reverse Surfaces Option Box"
  361.             -l "Reverse Surfaces Option Box"
  362.             reverseDialogItem;
  363.     }
  364.  
  365.     if( `optionVar -q modelWithToolRebuildSurface` ) {
  366.         menuItem -e
  367.             -l "Rebuild Surfaces Tool"
  368.             -annotation "Rebuild Surfaces Tool: Select surface(s)"
  369.             rebuildSrfItem;
  370.         menuItem -e
  371.             -annotation "Rebuild Surfaces Tool Option Box"
  372.             -l "Rebuild Surfaces Tool Option Box"
  373.             rebuildSurfaceDialogItem;
  374.     }
  375.     else {
  376.         menuItem -e
  377.             -l "Rebuild Surfaces"
  378.             -annotation "Rebuild Surfaces: Select surface(s)"
  379.             rebuildSrfItem;
  380.         menuItem -e
  381.             -annotation "Rebuild Surfaces Option Box"
  382.             -l "Rebuild Surfaces Option Box"
  383.             rebuildSurfaceDialogItem;
  384.     }
  385.  
  386.     if( `optionVar -q modelWithToolUntrim` ) {
  387.         menuItem -e
  388.             -l "Untrim Surfaces Tool"
  389.             -annotation "Untrim Surfaces Tool: Select a trimmed surface"
  390.             untrimItem;
  391.         menuItem -e
  392.             -annotation "Untrim Surfaces Tool Option Box"
  393.             -l "Untrim Surfaces Tool Option Box"
  394.             untrimDialogItem;
  395.     }
  396.     else {
  397.         menuItem -e
  398.             -l "Untrim Surfaces"
  399.             -annotation "Untrim Surfaces: Select a trimmed surface"
  400.             untrimItem;
  401.         menuItem -e
  402.             -annotation "Untrim Surfaces Option Box"
  403.             -l "Untrim Surfaces Option Box"
  404.             untrimDialogItem;
  405.     }
  406. }
  407.  
  408. global proc ModEditSurfacesMenu( string $parent )
  409. {
  410.     if( ! `isTrue "SurfaceUIExists"` ) return;
  411.  
  412.     // If this ever changes to true, we have to make sure
  413.     // we don't dim the tools.  So, don't just change the
  414.     // value.  Milan S.
  415.     int $dimWhenNoSelect = 0;
  416.  
  417.     setParent -m $parent;
  418.     int $isAdvModel = `licenseCheck -m "edit" -typ "model"`;
  419.     if( `menu -q -ni $parent` != 0 ) {
  420.         //
  421.         //    Menu is built already - just relabel and return
  422.         //
  423.         modEditSurfacesMenuLabel( $isAdvModel );
  424.         return;
  425.     }
  426.  
  427.     menuItem
  428.       -c "DuplicateNURBSPatches"
  429.       -dmc "duplicateSurfaceToolScript 2"
  430.       -i "duplicateSurface.xpm"
  431.       duplSrfItem;
  432.     menuItem -optionBox true -i "duplicateSurface.xpm"
  433.         -c "DuplicateNURBSPatchesOptions"
  434.       duplSrfDialog;
  435.     if( $dimWhenNoSelect )
  436.         dimWhen -f "SomethingSelected" ($parent+"|attachSrfItem");
  437.  
  438.     menuItem -d true;
  439.  
  440.     // project + interesect + trim + untrim.
  441.     //
  442.     menuItem
  443.         -c "ProjectCurveOnSurface"
  444.         -dmc "projectToolScript 2"
  445.         -i "projectCurve.xpm"
  446.         projectCurveItem;
  447.     menuItem -optionBox true
  448.         -i "projectCurve.xpm"
  449.         -c "ProjectCurveOnSurfaceOptions"
  450.         projectCurveDialogItem;
  451.     if( $dimWhenNoSelect )
  452.         dimWhen -f "SomethingSelected" ($parent+"|projectCurveItem") ;
  453.  
  454.     menuItem
  455.         -c "IntersectSurfaces"
  456.         -dmc "intersectToolScript 2"
  457.         -i "srfIntersect.xpm"
  458.         intersectItem;
  459.     menuItem -optionBox true 
  460.         -i "srfIntersect.xpm"
  461.         -c "IntersectSurfacesOptions"
  462.         intersectDialogItem;
  463.     if( $dimWhenNoSelect )
  464.         dimWhen -f "SomethingSelected" ($parent+"|intersectItem") ;
  465.  
  466.     menuItem -l "Trim Tool" 
  467.         -annotation "Trim Tool: Select a surface with a curve on it"
  468.         -image "trim.xpm"
  469.         -c "TrimTool" trimSurfaceItem;
  470.         menuItem -optionBox true -image "trim.xpm"
  471.             -annotation "Trim Tool Option Box"
  472.             -l "Trim Tool Option Box"
  473.             -c "TrimToolOptions" trimDialogItem;
  474.  
  475.     menuItem
  476.         -c "UntrimSurfaces"
  477.         -dmc "untrimToolScript 2"
  478.         -image "untrim.xpm"
  479.         untrimItem;
  480.     menuItem -optionBox true -image "untrim.xpm"
  481.         -c "UntrimSurfacesOptions"
  482.         untrimDialogItem;
  483.     if( $dimWhenNoSelect )
  484.         dimWhen -f "SomethingSelected" ($parent+"|untrimItem");
  485.  
  486.     menuItem -d true;
  487.  
  488.     // booleans.
  489.     //
  490.     if( $isAdvModel ) {
  491.       menuItem -l "Booleans" -sm 1 -to 1 -aob true;    
  492.         menuItem -l "Union Tool"
  493.           -c "SurfaceBooleanUnionTool"
  494.           -dmc "nurbsBooleanToolScript 2 0"
  495.           -annotation "Union Tool: Select two sets of NURBS surfaces"
  496.           -image "nurbsShellUnion.xpm"
  497.           booleanUnionItem;
  498.         menuItem -optionBox true -image "nurbsShellUnion.xpm"
  499.           -annotation "Union Option Box"
  500.           -l "NURBS Boolean Union Option Box"
  501.           -c "SurfaceBooleanUnionToolOptions"
  502.           unionOptItem;
  503.  
  504.         menuItem -l "Subtract Tool"
  505.           -c "SurfaceBooleanSubtractTool"
  506.           -dmc "nurbsBooleanToolScript 2 1"
  507.           -annotation "Subtract Tool: Select two sets of NURBS surfaces"
  508.           -image "nurbsShellSubtract.xpm"
  509.           booleanSubtractItem;
  510.         menuItem -optionBox true -image "nurbsShellSubtract.xpm"
  511.           -annotation "Subtract Option Box"
  512.           -l "NURBS Boolean Subtract Option Box"
  513.           -c "SurfaceBooleanSubtractToolOptions"
  514.           subtractOptItem;
  515.  
  516.         menuItem -l "Intersect Tool"
  517.           -c "SurfaceBooleanIntersectTool"
  518.           -dmc "nurbsBooleanToolScript 2 2"
  519.           -annotation "Intersect Tool: Select two sets of NURBS surfaces"
  520.           -image "nurbsShellIntersect.xpm"
  521.           booleanIntersectItem;
  522.         menuItem -optionBox true -image "nurbsShellIntersect.xpm"
  523.           -annotation "Intersect Option Box"
  524.           -l "NURBS Boolean Intersectt Option Box"
  525.           -c "SurfaceBooleanIntersectToolOptions"
  526.           intersectOptItem;
  527.         setParent -m ..;
  528.       menuItem -d true;
  529.     }
  530.  
  531.     // Attach + detach + Align + Open(close).
  532.     //
  533.     menuItem
  534.       -c "AttachSurfaces"
  535.       -dmc "attachSrfToolScript 2"
  536.       -i "align.xpm"
  537.       attachSrfItem;
  538.     menuItem -optionBox true -i "align.xpm"
  539.         -c "AttachSurfacesOptions"
  540.       attachSrfDialog;
  541.     if( $dimWhenNoSelect )
  542.         dimWhen -f "SomethingSelected" ($parent+"|attachSrfItem");
  543.  
  544.     // attach with gap fill
  545.     //
  546.     menuItem -l "Attach Without Moving" 
  547.         -annotation "Attach two surfaces by filling the gap between the two surfaces."
  548.         -c "attachWithoutMoving" attachWithoutMovingItem;
  549.  
  550.     menuItem
  551.         -c "DetachSurfaces"
  552.         -dmc "detachSurfaceToolScript 2"
  553.         -i "detach.xpm"
  554.         detachItem;
  555.     menuItem -optionBox true -i "detach.xpm"
  556.         -c "DetachSurfacesOptions"
  557.         detachDialog;
  558.     if( $dimWhenNoSelect )
  559.         dimWhen -f "SomethingSelected" ($parent+"|detachItem");
  560.  
  561.     menuItem
  562.         -c "AlignSurfaces"
  563.         -dmc "alignSurfaceToolScript 2"
  564.         -i "alignSurface.xpm" 
  565.         alignItem;
  566.     menuItem -optionBox true -i "alignSurface.xpm" 
  567.         -c "AlignSurfacesOptions"
  568.         alignDialogItem;
  569.     if( $dimWhenNoSelect )
  570.         dimWhen -f "SomethingSelected" ($parent+"|alignItem");
  571.  
  572.     menuItem
  573.         -c "OpenCloseSurfaces"
  574.         -dmc "closeSurfaceToolScript 2"
  575.         -i "openCloseSurface.xpm"
  576.         closeItem;
  577.     menuItem -optionBox true -i "openCloseSurface.xpm"
  578.         -c "OpenCloseSurfacesOptions"
  579.         closeDialogItem;
  580.     if( $dimWhenNoSelect )
  581.         dimWhen -f "SomethingSelected" ($parent+"|closeItem");
  582.  
  583.  
  584.     // move seam mel script
  585.     //
  586.     menuItem -l "Move Seam" 
  587.         -annotation "Move seam on a periodic surface: Select isoparm for new seam location"
  588.         -c "moveNurbsSurfaceSeam" moveSurfaceSeamItem;
  589.  
  590.     menuItem -d true ;
  591.  
  592.     menuItem
  593.         -c "InsertIsoparms"
  594.         -dmc "insertSurfaceToolScript 2"
  595.         -i "insert.xpm"
  596.         insertItem;
  597.     menuItem -optionBox true -i "insert.xpm"
  598.         -c "InsertIsoparmsOptions"
  599.         insertDialog;
  600.     if( $dimWhenNoSelect )
  601.         dimWhen -f "SomethingSelected" ($parent+"|insertItem");
  602.  
  603.     if( $isAdvModel ) {
  604.         menuItem
  605.             -c "ExtendSurfaces"
  606.             -dmc "extendSurfaceToolScript 2"
  607.             -i "extendSurface.xpm"
  608.             extendSrfItem;
  609.         menuItem -optionBox true -i "extendSurface.xpm"
  610.             -c "ExtendSurfacesOptions"
  611.             extendSurfaceDialogItem;
  612.         if( $dimWhenNoSelect )
  613.             dimWhen -f "SomethingSelected" ($parent+"|extendSrfItem");
  614.  
  615.         menuItem
  616.             -c "OffsetSurfaces"
  617.             -dmc "offsetSurfaceToolScript 2"
  618.             -i "offsetSurface.xpm"
  619.             surfOffsetItem;
  620.         menuItem -optionBox true
  621.             -i "offsetSurface.xpm"
  622.             -c "OffsetSurfacesOptions"
  623.             offsetSurfaceDialogItem;
  624.       if( $dimWhenNoSelect )
  625.         dimWhen -f "SomethingSelected" ($parent+"|surfOffsetItem") ;
  626.     }
  627.  
  628.     menuItem
  629.         -c "ReverseSurfaceDirection"
  630.         -dmc "reverseSurfaceToolScript 2"
  631.         -i "reverseSurface.xpm"
  632.         reverseItem;
  633.     menuItem -optionBox true -i "reverseSurface.xpm"
  634.         -c "ReverseSurfaceDirectionOptions"
  635.         reverseDialogItem;
  636.     if( $dimWhenNoSelect )
  637.         dimWhen -f "SomethingSelected" ($parent+"|reverseItem");
  638.  
  639.     menuItem -d true ;
  640.  
  641.     // rebuild.
  642.     //
  643.     menuItem
  644.         -c "RebuildSurfaces"
  645.         -dmc "rebuildSurfaceToolScript 2"
  646.         -i "rebuildSurface.xpm"
  647.         rebuildSrfItem;
  648.     menuItem -optionBox true -i "rebuildSurface.xpm"
  649.         -c "RebuildSurfacesOptions"
  650.         rebuildSurfaceDialogItem;
  651.     if( $dimWhenNoSelect )
  652.         dimWhen -f "SomethingSelected" ($parent+"|rebuildSrfItem");
  653.  
  654.     menuItem -d true;
  655.  
  656.     // round + surface fillet.
  657.     //
  658.     if( $isAdvModel ) {
  659.         menuItem -l "Round Tool"
  660.             -annotation "Round Tool: Select pairs of surface edges that meet"
  661.             -image "roundSrf.xpm"
  662.             -c "RoundTool" roundItem;
  663.         menuItem -optionBox true -image "roundSrf.xpm"
  664.             -annotation "Round Tool Option Box"
  665.             -l "Round Tool Option Box"
  666.             -c "RoundToolOptions"
  667.             roundOptionItem;
  668.     }
  669.  
  670.     menuItem -l "Surface Fillet" -sm 1 -to 1 -aob true;
  671.         menuItem
  672.             -c "CircularFillet"
  673.             -dmc "circFilletToolScript 2"
  674.             -i "surfaceFillet.xpm"
  675.             circularFilletItem;
  676.         menuItem -optionBox true
  677.             -i "surfaceFillet.xpm"
  678.             -c "CircularFilletOptions"
  679.             circularFilletDialogItem;
  680.         if( $dimWhenNoSelect )
  681.             dimWhen -f "SomethingSelected" ($parent+"|circularFilletItem") ;
  682.  
  683.         menuItem
  684.             -c "FreeformFillet"
  685.             -dmc "freeFilletToolScript 2"
  686.             -i "filletFreeform_S.xpm"
  687.             freeFormFilletItem ;
  688.         menuItem -optionBox true
  689.             -i "filletFreeform_S.xpm"
  690.             -c "FreeformFilletOptions"
  691.             freeFormFilletDialogItem;
  692.         if( $dimWhenNoSelect )
  693.             dimWhen -f "SomethingSelected" ($parent+"|freeFormFilletItem");
  694.  
  695.         menuItem -l "Fillet Blend Tool"
  696.                -c "FilletBlendTool"
  697.                -dmc "blendToolScript 2"
  698.                -annotation ("Fillet Blend Tool: Select curves " +
  699.                          "on surface, isoparms or trim edges")
  700.                -image "blendSurface.xpm"
  701.             blendItem;
  702.         menuItem -optionBox true -image "blendSurface.xpm"
  703.             -annotation "Fillet Blend Tool Option Box"
  704.             -l "Fillet Blend Tool Option Box"
  705.             -c "FilletBlendToolOptions"
  706.             blendDialogItem;
  707.     setParent -m .. ;
  708.     menuItem -d true;
  709.     
  710.  
  711.     // Stitch
  712.     //
  713.  
  714.     menuItem -l "Stitch" -sm 1 -to 1 -aob true;
  715.  
  716.         menuItem -l "Stitch Surface Points"
  717.             -c "StitchSurfacePoints"
  718.         -dmc "performStitchSurfacePoints(2)"
  719.         -annotation ( "Stitch Surface Points: Select edge points " +
  720.                       "and/or edge CV's on the surface" )
  721.         -i "stitchSurfacePoints.xpm"
  722.         stitchSurfacePointsItem;
  723.             menuItem -optionBox true
  724.             -annotation "Stitch Surface Points Option Box"
  725.             -l "Stitch Surface Points Option Box"
  726.             -i "stitchSurfacePoints.xpm"
  727.             -c "StitchSurfacePointsOptions"
  728.             stitchSurfacePointsDialogItem;
  729.         if( $dimWhenNoSelect )
  730.          dimWhen -f "SomethingSelected" ($parent+"|stitchSurfacePointsItem") ;
  731.  
  732.         menuItem -l "Stitch Edges Tool"
  733.             -annotation "Stitch Edges Tool: Select two isoparms"
  734.             -image "stitchSrf.xpm"
  735.             -c "StitchEdgesTool" surfStitchItem;
  736.         menuItem -optionBox true -image "stitchSrf.xpm"
  737.             -annotation "Stitch Tool Option Box"
  738.             -l "Stitch Tool Option Box"
  739.             -c "StitchEdgesToolOptions" stitchSrfDialogItem;
  740.  
  741.         menuItem
  742.             -c "GlobalStitch"
  743.             -dmc "globalStitchToolScript 2"
  744.             -image "globalStitch.xpm"
  745.             globalStitchItem;
  746.         menuItem -optionBox true
  747.             -image "globalStitch.xpm"
  748.             -c "GlobalStitchOptions"
  749.             globalStitchDialogItem;
  750.         if( $dimWhenNoSelect )
  751.             dimWhen -f "SomethingSelected" ($parent+"|globalStitchItem") ;
  752.  
  753.     setParent -m .. ;
  754.  
  755.     if (`isTrue "NurbsExists"`) {
  756.         menuItem -d true;
  757.  
  758.         menuItem -l "Sculpt Surfaces Tool" 
  759.             -image "putty.xpm"
  760.             -annotation "Sculpt Surfaces Tool: Sculpt a NURBS surface"
  761.             -c "SculptSurfacesTool" puttyItem;
  762.             menuItem -optionBox true -image "putty.xpm"
  763.                 -annotation "Sculpt Surfaces Tool Option Box"
  764.                 -l "Sculpt Surfaces Tool Option Box"
  765.                 -c "SculptSurfacesToolOptions" 
  766.                 puttyDialogItem;
  767.         menuItem -l "Surface Editing" -sm 1 -to 1 -aob true;
  768.  
  769.             menuItem -l "Surface Editing Tool"
  770.                 -annotation "Surface Editing Tool: Select a surface"
  771.                 -image "surfaceEditor.xpm"
  772.                 -c "SurfaceEditingTool"
  773.                 surfaceEditorItem;
  774.             menuItem -optionBox true -image "surfaceEditor.xpm"
  775.                 -annotation "Surface Editing Tool Option Box"
  776.                 -l "Surface Editing Tool Option Box"
  777.                 -c "SurfaceEditingToolOptions"
  778.                 surfaceEditorDialogItem;
  779.  
  780.             menuItem -l "Break Tangent"
  781.                 -annotation ("Break Tangent: Select an isoparm or " +
  782.                              "a surface point")
  783.                 -c "BreakTangent"
  784.                 breakTangentItem;
  785.  
  786.             menuItem -l "Smooth Tangent"
  787.                 -annotation ("Smooth Tangent: Select an isoparm or " +
  788.                              "a surface point")
  789.                 -c "SmoothTangent"
  790.                 smoothTangentItem;
  791.  
  792.         setParent -m ..;
  793.     }
  794.  
  795.     menuItem -d true;
  796.  
  797.     menuItem -l "Selection" -sm 1 -to 1 -aob true;
  798.  
  799.     menuItem -l "Grow CV Selection"
  800.         -ann "Grow CV Selection: Grow the selected CV region along the NURBS surface"
  801.         -c "nurbsSelect -gs 1";
  802.  
  803.     menuItem -l "Shrink CV Selection"
  804.         -ann "Shrink CV Selection: Shrink the selected region along the NURBS surface"
  805.         -c "nurbsSelect -ss 1";
  806.  
  807.     menuItem -l "Select CV Selection Boundary"
  808.         -ann "Select CV Selection Boundary: Select the boundary of the current selection region"
  809.         -c "nurbsSelect -bs";
  810.  
  811.     menuItem -l "Select Surface Border"
  812.         -ann "Select Surface Border: Select all CV along the given borders"
  813.         -c "performSelectNurbsBorder 0";
  814.  
  815.     menuItem  -optionBox 1 -l "Select Surface Border Option Box"
  816.         -ann "Select Surface Border Option Box" -ecr false 
  817.         -c "performSelectNurbsBorder 1" ;
  818.  
  819.     setParent -m ..;
  820.  
  821.     modEditSurfacesMenuLabel( $isAdvModel );
  822. }
  823.